home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr05 / ew120.zip / FILES1.ZIP / EWAPIIMP.PAS < prev    next >
Pascal/Delphi Source File  |  1993-05-02  |  13KB  |  243 lines

  1. {************************************************}
  2. {                                                }
  3. { E! for Windows                                 }
  4. { (c) - Patrick Philippot - 1992,93              }
  5. { EWAPI DLL import unit                          }
  6. { version 1.2                                    }
  7. {                                                }
  8. {************************************************}
  9. {$IFDEF DEBUG}
  10. {$A-,G+,B-,D+,F+,I-,N-,R+,S-,V-,L+}
  11. {$ELSE}
  12. {$A-,G+,B-,D-,F+,I-,N-,R-,S-,V-,L-}
  13. {$ENDIF}
  14.  
  15. unit EWAPIImp;
  16.  
  17. INTERFACE
  18.  
  19. uses WinTypes, EWTypes;
  20.  
  21. {$I ewuser.inc}
  22.  
  23. {///////////////////////////// EW Primer access ///////////////////////////}
  24.  
  25. function EWAddTab(col : integer; fAdd : word) : integer;
  26. function EWAlternateHelp(col, row : integer) : integer;
  27. function EWBeginLine(fSkipToPrev : word) : integer;
  28. function EWBlockShift : integer;
  29. function EWBlockSort(fAscend : word) : integer;
  30. function EWCase(fUpper : word) : integer;
  31. function EWCheckBrace(col, row : integer) : integer;
  32. function EWClearLine(row : integer) : integer;
  33. function EWExecCompileCommand(commandindex : word) : integer;
  34. function EWDeleteChar : integer;
  35. function EWDeleteCurLine : integer;
  36. function EWDeleteEOL : integer;
  37. function EWDeleteLeft(fDeleteCurrent : word) : integer;
  38. function EWDeleteLines(start, num : integer) : integer;
  39. function EWDeleteSelection  : integer;
  40. function EWDeleteWord : integer;
  41. function EWEndLine(fSkipToNext, fStrip : word) : integer;
  42. function EWFillBlock(ch : char) : integer;
  43. function EWGetFile(Name : PChar; row : integer) : integer;
  44. function EWGotoBookmark(index : word) : integer;
  45. function EWGotoNextParagraph : integer;
  46. function EWGotoNextTab : integer;
  47. function EWGotoPrevTab : integer;
  48. function EWGotoPrevParagraph : integer;
  49. function EWGotoCompileError(fNext : word) : integer;
  50. function EWGotoLine(row : integer) : integer;
  51. function EWGotoXY(col, row : integer) : integer;
  52. function EWGotoSelection(fBegin : word) : integer;
  53. function EWInsertBrace(col, row : integer) : integer;
  54. function EWInsertLines(start, num : integer) : integer;
  55. function EWInsertMacroText(col, row : integer; macrotype : word) : integer;
  56. function EWJoinLine(row : integer) : integer;
  57. function EWLoadUserFile(col, row : integer) : integer;
  58. function EWNextCol : integer;
  59. function EWNextLine : integer;
  60. function EWNextWord(fNext : word) : integer;
  61. function EWTopOfPage(fTop : word) : integer;
  62. function EWHorzPageScroll(fLeft : word) : integer;
  63. function EWVerPageScroll(fUp : word) : integer;
  64. function EWPrevCol : integer;
  65. function EWPrevLine : integer;
  66. function EWPaste(fInsert : word) : integer;
  67. function EWReflow(row : integer) : integer;
  68. function EWRefresh(fAsk : word) : integer;
  69. function EWRemoveBookmark(index : word) : integer;
  70. function EWSaveFile(Name : PChar) : integer;
  71. function EWSelectAll : integer;
  72. function EWSetBookmark(col, row : integer) : integer;
  73. function EWSetClipboard(fAppend : word) : integer;
  74. function EWPositionCurLine(position : word) : integer;
  75. function EWShiftTextRight(col, row, count : integer) : integer;
  76. function EWSplitLine(col, row : integer) : integer;
  77. function EWStepScroll(dX, dY : integer) : integer;
  78. function EWSumBlock : integer;
  79. function EWStripFlow : integer;
  80. function EWTopOfText(fTop : word) : integer;
  81. function EWTextToCurSor : integer;
  82. function EWToggleInsert : integer;
  83. function EWUpcaseFirst(col, row : integer) : integer;
  84. function EWWriteBlock(startrow, endrow, startcol, endcol : integer;
  85.                       Name      : PChar;
  86.                       mode,
  87.                       fBlock,
  88.                       fCompress : word) : integer;
  89.  
  90. {//////////////////////// Service Routines ////////////////////////////////}
  91.  
  92. function  EWAddMenuEntry(Command, Title : PChar; CommandId : word; AssignMode : word; RoutineId : word) : longint;
  93. function  EWBeginSelection(SelType : word; col, row : integer) : integer;
  94. function  EWCallUserExt(ExtName : PChar) : integer;
  95. function  EWEditFile(Name : PChar) : longint;
  96. function  EWEndSelection : integer;
  97. procedure EWEnumClones(EditorId : longint; CloneEnumProc : TEnumClonesProc);
  98. procedure EWEnumEditors(EdEnumProc : TEnumEditorsProc);
  99. function  EWFind(MatchLen : PWord) : longint;
  100. function  EWFindRegular(src, dest : PChar; MatchLen : PWord) : word;
  101. function  EWGetCaretPos : longint;
  102. function  EWGetCloneNum : word;
  103. function  EWGetCurWord : longint;
  104. function  EWGetCurrentEditor : longint;
  105. function  EWGetFileName(EditorId : longint) : PChar;
  106. function  EWGetGlobalFlag(FlagId : word) : integer;
  107. function  EWGetInsertState : word;
  108. function  EWGetLineAt(index : integer) : PChar;
  109. function  EWGetLineCount : integer;
  110. function  EWGetLocalFlag(FlagId : word) : integer;
  111. function  EWGetSearchFlag(FlagId : word) : integer;
  112. procedure EWGetSelection(Selection : PSelStruct);
  113. function  EWGetTextPos : longint;
  114. function  EWGetVersion : word;
  115. function  EWGetWindowHandle : word;
  116. function  EWGetTextWindowHandle : word;
  117. function  EWIsRegistered :word;
  118. procedure EWRemoveHook(hFlag : word; HookAddress : pointer);
  119. function  EWRemoveMenuEntry(Id : longint) : longint;
  120. function  EWRepeatFind(MatchLen : PWord) : longint;
  121. procedure EWSetCCHandle(H : HWnd);
  122. function  EWSetCurrentEditor(EditorId : longint) : longint;
  123. procedure EWSetEditorId(EditorId : longint);
  124. procedure EWSetFindPattern(pattern : PChar);
  125. function  EWSetGlobalFlag(FlagId, value : word) : integer;
  126. procedure EWSetHook(hFlag : word; HookAddress : pointer);
  127. function  EWSetLineAt(P : PChar; index : integer) : integer;
  128. function  EWSetLocalFlag(FlagId, value : word) : integer;
  129. procedure EWSetModified;
  130. function  EWSetSearchFlag(FlagId, value : word) : integer;
  131. procedure EWSetWindowHandle(H : HWnd);
  132. function  EWStopSelection(col, row : integer) : integer;
  133. function  EWUpdateSelection(col, row : integer) : integer;
  134. procedure EWWriteMessage(message : PChar);
  135. function  EWGetInstance : word;
  136.  
  137. IMPLEMENTATION
  138.  
  139. function EWAddTab;                     external 'ewapi' index  1;
  140. function EWBeginLine;                  external 'ewapi' index  2;
  141. function EWBlockShift;                 external 'ewapi' index  3;
  142. function EWBlockSort;                  external 'ewapi' index  4;
  143. function EWCase;                       external 'ewapi' index  5;
  144. function EWCheckBrace;                 external 'ewapi' index  6;
  145. function EWClearLine;                  external 'ewapi' index  7;
  146. function EWExecCompileCommand;         external 'ewapi' index  8;
  147. function EWDeleteChar;                 external 'ewapi' index  9;
  148. function EWDeleteCurLine;              external 'ewapi' index 10;
  149. function EWDeleteEOL;                  external 'ewapi' index 11;
  150. function EWDeleteLeft;                 external 'ewapi' index 12;
  151. function EWDeleteLines;                external 'ewapi' index 13;
  152. function EWDeleteSelection;            external 'ewapi' index 14;
  153. function EWDeleteWord;                 external 'ewapi' index 15;
  154. function EWEndLine;                    external 'ewapi' index 16;
  155. function EWFillBlock;                  external 'ewapi' index 17;
  156. function EWGetFile;                    external 'ewapi' index 18;
  157. function EWGotoBookmark;               external 'ewapi' index 19;
  158. function EWGotoNextParagraph;          external 'ewapi' index 20;
  159. function EWGotoNextTab;                external 'ewapi' index 21;
  160. function EWGotoPrevTab;                external 'ewapi' index 22;
  161. function EWGotoPrevParagraph;          external 'ewapi' index 23;
  162. function EWGotoCompileError;           external 'ewapi' index 24;
  163. function EWGotoLine;                   external 'ewapi' index 25;
  164. function EWGotoXY;                     external 'ewapi' index 26;
  165. function EWGotoSelection;              external 'ewapi' index 27;
  166. function EWInsertBrace;                external 'ewapi' index 28;
  167. function EWInsertLines;                external 'ewapi' index 29;
  168. function EWInsertMacroText;            external 'ewapi' index 30;
  169. function EWJoinLine;                   external 'ewapi' index 31;
  170. function EWLoadUserFile;               external 'ewapi' index 32;
  171. function EWNextCol;                    external 'ewapi' index 33;
  172. function EWNextLine;                   external 'ewapi' index 34;
  173. function EWNextWord;                   external 'ewapi' index 35;
  174. function EWTopOfPage;                  external 'ewapi' index 36;
  175. function EWHorzPageScroll;             external 'ewapi' index 37;
  176. function EWVerPageScroll;              external 'ewapi' index 38;
  177. function EWPrevCol;                    external 'ewapi' index 39;
  178. function EWPrevLine;                   external 'ewapi' index 40;
  179. function EWPaste;                      external 'ewapi' index 41;
  180. function EWReflow;                     external 'ewapi' index 42;
  181. function EWRefresh;                    external 'ewapi' index 43;
  182. function EWRemoveBookmark;             external 'ewapi' index 44;
  183. function EWSaveFile;                   external 'ewapi' index 45;
  184. function EWSelectAll;                  external 'ewapi' index 46;
  185. function EWSetBookmark;                external 'ewapi' index 47;
  186. function EWSetClipboard;               external 'ewapi' index 48;
  187. function EWPositionCurLine;            external 'ewapi' index 49;
  188. function EWShiftTextRight;             external 'ewapi' index 50;
  189. function EWSplitLine;                  external 'ewapi' index 51;
  190. function EWStepScroll;                 external 'ewapi' index 52;
  191. function EWSumBlock;                   external 'ewapi' index 53;
  192. function EWStripFlow;                  external 'ewapi' index 54;
  193. function EWTopOfText;                  external 'ewapi' index 55;
  194. function EWTextToCurSor;               external 'ewapi' index 56;
  195. function EWToggleInsert;               external 'ewapi' index 57;
  196. function EWUpcaseFirst;                external 'ewapi' index 58;
  197. function EWWriteBlock;                 external 'ewapi' index 59;
  198. function EWAlternateHelp;              external 'ewapi' index 60;
  199. {///////////////////////////////////////////////////////////////}
  200. function  EWAddMenuEntry;              external 'ewapi' index 61;
  201. function  EWBeginSelection;            external 'ewapi' index 62;
  202. function  EWCallUserExt;               external 'ewapi' index 63;
  203. function  EWEditFile;                  external 'ewapi' index 64;
  204. function  EWEndSelection;              external 'ewapi' index 65;
  205. procedure EWEnumClones;                external 'ewapi' index 66;
  206. procedure EWEnumEditors;               external 'ewapi' index 67;
  207. function  EWFind;                      external 'ewapi' index 68;
  208. function  EWFindRegular;               external 'ewapi' index 69;
  209. function  EWGetCaretPos;               external 'ewapi' index 70;
  210. function  EWGetCloneNum;               external 'ewapi' index 71;
  211. function  EWGetCurWord;                external 'ewapi' index 72;
  212. function  EWGetCurrentEditor;          external 'ewapi' index 73;
  213. function  EWGetFileName;               external 'ewapi' index 74;
  214. function  EWGetGlobalFlag;             external 'ewapi' index 75;
  215. function  EWGetInsertState;            external 'ewapi' index 76;
  216. function  EWGetLineAt;                 external 'ewapi' index 77;
  217. function  EWGetLineCount;              external 'ewapi' index 78;
  218. function  EWGetLocalFlag;              external 'ewapi' index 79;
  219. function  EWGetSearchFlag;             external 'ewapi' index 80;
  220. procedure EWGetSelection;              external 'ewapi' index 81;
  221. function  EWGetTextPos;                external 'ewapi' index 82;
  222. function  EWGetVersion;                external 'ewapi' index 83;
  223. function  EWGetWindowHandle;           external 'ewapi' index 84;
  224. procedure EWRemoveHook;                external 'ewapi' index 86;
  225. function  EWRemoveMenuEntry;           external 'ewapi' index 87;
  226. function  EWRepeatFind;                external 'ewapi' index 88;
  227. function  EWSetCurrentEditor;          external 'ewapi' index 90;
  228. procedure EWSetFindPattern;            external 'ewapi' index 92;
  229. function  EWSetGlobalFlag;             external 'ewapi' index 93;
  230. procedure EWSetHook;                   external 'ewapi' index 94;
  231. function  EWSetLineAt;                 external 'ewapi' index 95;
  232. function  EWSetLocalFlag;              external 'ewapi' index 96;
  233. function  EWSetSearchFlag;             external 'ewapi' index 97;
  234. function  EWStopSelection;             external 'ewapi' index 99;
  235. function  EWUpdateSelection;           external 'ewapi' index 100;
  236. procedure EWWriteMessage;              external 'ewapi' index 101;
  237. function  EWGetTextWindowHandle;       external 'ewapi' index 102;
  238. procedure EWSetModified;               external 'ewapi' index 103;
  239. function  EWGetInstance;               external 'ewapi' index 104;
  240. function  EWIsModified;                external 'ewapi' index 105;
  241.  
  242. end.
  243.